home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2007 September / PCWSEP07.iso / Software / Linux / Linux Mint 3.0 Light / LinuxMint-3.0-Light.iso / casper / filesystem.squashfs / etc / init.d / festival < prev    next >
Encoding:
Text File  |  2006-10-06  |  1.2 KB  |  49 lines

  1. #! /bin/sh
  2. # /etc/init.d/festival
  3. #
  4. # Init script for starting Festival as a system-wide server process.
  5. #
  6. # Written by David Huggins-Daines <dhd@cepstral.com>
  7.  
  8. # Comment out the next line to start a Festival server at boot time.
  9. exit 0
  10. # NOTE: Not just anybody can connect to your server; the list of allowed
  11. # hostnames is a regexp. Check /usr/share/festival/festival.scm for more
  12. # helpful comments; add your settings to /etc/festival.scm.
  13. #
  14.  
  15. set -e
  16.  
  17. DAEMON=/usr/bin/festival
  18. REALPROC=/usr/bin/festival
  19. NAME=festival
  20.  
  21. test -x $DAEMON || exit 0
  22.  
  23. case "$1" in
  24.   start)
  25.     echo -n "Starting Festival server: "
  26.     start-stop-daemon --start --chuid nobody:audio --background \
  27.         --exec $DAEMON -- --server
  28.     echo "done."
  29.     ;;
  30.   stop)
  31.     echo -n "Stopping Festival server: "
  32.     start-stop-daemon --stop --oknodo --exec $REALPROC
  33.     echo "done."
  34.     ;;
  35.   restart|reload|force-reload)
  36.     echo "Restarting Festival server: "
  37.     start-stop-daemon --stop --oknodo --exec $REALPROC
  38.     start-stop-daemon --start --chuid nobody:audio --background \
  39.         --exec $DAEMON -- --server
  40.     echo "done."
  41.     ;;
  42.   *)
  43.     echo "Usage: /etc/init.d/$NAME {start|stop|restart}"
  44.     exit 1
  45.     ;;
  46. esac
  47.  
  48. exit 0
  49.